Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix caching to prevent displaying the wrong variant #150

Conversation

mhkc
Copy link
Collaborator

@mhkc mhkc commented Apr 5, 2024

This PR fixes a bug that could cause the wrong to be displayed different regions were being displayed for the same case at the same time.

close #133

How to test:

  1. Use example variant in production Gens, http://cmdscout2.lund.skane.se/gens/24MD00143?region=6:32002301-32016300&variant=ee7d5522e87b70eb5bf525a6fce18104&genome_build=38&case_id=24MD00143&individual_id=24MD00143
  2. Try repoducing the bug by first opening the variant in the production version of Gens.
  3. Then change chromosome 6 to 8 in the url just after the page has loaded
  4. Verify that the chromosome number has not changed to 8 and the variant is still being displayed.
  5. Open the same variant in the dev version of Gens by replacing gens with gens_dev in the URL and repeat the steps above to reproduce the bug,

Expected outcome:
The new region and variant should be displayed.

Review:

  • code approved by

@alkc alkc self-requested a review April 5, 2024 12:21
@alkc
Copy link

alkc commented Apr 5, 2024

The test checks out. Changing the chromosome in the url in gens_dev loads the correct chromosome position. This does not occur on the production instance.

gens/cache.py Outdated Show resolved Hide resolved
mhkc added 3 commits April 8, 2024 09:01
…ens-using-links-from-scout' of github.com:Clinical-Genomics-Lund/gens into 133-sometimes-the-wrong-variant-is-being-displayed-in-gens-using-links-from-scout
Copy link

@alkc alkc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reran the tests and can confirm the bug is fixed in the dev instance.

@mhkc mhkc merged commit 55946b2 into master Apr 8, 2024
6 checks passed
@mhkc mhkc deleted the 133-sometimes-the-wrong-variant-is-being-displayed-in-gens-using-links-from-scout branch April 8, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sometimes the wrong variant is being displayed in Gens using links from Scout.
2 participants